package demo2.subjectImpl;
import java.util.Observable;

/**
 * @author 24岁没牵过女人的手
 * 日期：2023/6/29 15:05
 * 文件描述：
 */
public class WeatherData extends Observable {

    private double temperature;
    private double humidity;
    private double pressure;

    public WeatherData() {
    }
    public void measurementsChanged() {
        setChanged();
        notifyObservers();
    }

    public void setMeasurements(double temperature, double humidity, double pressure){
        this.temperature = temperature;
        this.humidity = humidity;
        this.pressure = pressure;
        measurementsChanged();
    }
    // other methods


    public double getTemperature() {
        return temperature;
    }

    public double getHumidity() {
        return humidity;
    }

    public double getPressure() {
        return pressure;
    }
}
